<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>条件渲染</title>
		<script type="text/javascript" src="../js/vue.js"></script>
	</head>
	<body>	
		<div id="root">
			<h2 >当前的n值是:{{n}}</h2>
			<button @click="n++">点我n+1</button>
			<h2 v-show="n==1">当前的n值是:{{n}}</h2>
			<h2 v-if="n==2">当前的n值是:{{n}}</h2>
		</div>
	</body>

	<script type="text/javascript">
		Vue.config.productionTip = false

		const vm = new Vue({
			el:'#root',
			data:{
				name:'尚硅谷',
				n:0
			}
		})
	</script>
</html>